<?php

namespace app\common\business;

class Constant
{

    public static $Gender=[
        0=>'-',
        1=>'男',
        2=>'女'
    ];

    public static $Whether=[
        1=>'是',
        2=>'否'
    ];

    public static $TalentType=[
        1=>'人才',
        2=>'领军人才基本情况',
        3=>'人才引进',
        4=>'陇原人才服务卡'
    ];

    public static $TalentCategory=[
        1=>'国家“万人计划”科技创业领军人才',
        2=>'国家“百千万人才工程”人才',
        3=>'国务院特贴专家',
        4=>'省级领军人才',
        5=>'省拔尖领军人才',
        6=>'省优专家',
        7=>'省陇原青年人才',
        8=>'人才引进',
    ];

    public static function constant(): array
    {
        return ['Gender'=>self::formatting(self::$Gender),'Whether'=>self::formatting(self::$Whether),'TalentType'=>self::formatting(self::$TalentType),'TalentCategory'=>self::formatting(self::$TalentCategory)];
    }

    public static function formatting($data): array
    {
        $newData=[];
        foreach ($data as $k=>$v){
            $newData[]=['id'=>$k,'name'=>$v];
        }
        return $newData;
    }
}
